<template>
	<view class="content"  :style="{height: tabHeightVal}">
		<view class="topcomtent">
		 <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
			 <view class="content_Gaik">
			 				 <view class="content_head">
			 					 <view style="width: 60rpx;float: left;">
			 						 <image src="../../static/images/icon-manages.png" class="item-icon" mode=""></image>
			 						 
			 					 </view>
			 					<view style="width: 85%;float: left;font-size: 32rpx;margin-left: 15rpx;">
									资产统计</view>
			 				 </view>
			 				 <view style="height: 400rpx;">
			 					 <view style="height: 160rpx;width: 100%;float: left;margin-top: 10rpx;font-size: 30rpx;">
			 						<view style="text-align: center;width: 100%;margin-left: 0px;line-height: 100rpx;height: 100rpx;font-size: 50rpx;float: left;
									color:#6D8AF9;" @tap="zcnum_click($event)" data-id="all">
			 							{{sumCount}}
			 						 </view>
			 						<view style="line-height: 50rpx;height: 50rpx;width: 100%;float: left;text-align:center;margin-top: -15rpx;">总资产</view>
			 					 </view>
							<view style="height: 90rpx;width: 100%;float: left;">
			 					<view style="text-align: center;width: 20%;margin-left: 0px;line-height: 60rpx;height: 60rpx;float: left;">
									<view>在用</view>
									<view class="content_head_zcnum" @tap="zcnum_click($event)" data-id="zy">{{sumCount_ZY}}</view>
			 					</view>
								<view style="text-align: center;width: 20%;margin-left: 0px;line-height: 60rpx;height: 60rpx;float: left;">
									<view>在库</view>
									<view class="content_head_zcnum" @tap="zcnum_click($event)" data-id="kc">{{sumCount_KC}}</view>
								</view>
								<view style="text-align: center;width: 20%;margin-left: 0px;line-height: 60rpx;height: 60rpx;float: left;">
									<view>闲置</view>
									<view class="content_head_zcnum" @tap="zcnum_click($event)" data-id="xz">{{sumCount_XZ}}</view>
								</view>
								<view style="text-align: center;width: 20%;margin-left: 0px;line-height: 60rpx;height: 60rpx;float: left;">
									<view>借用</view>
									<view class="content_head_zcnum" @tap="zcnum_click($event)" data-id="jy">{{sumCount_JY}}</view>
								</view>
								<view style="text-align: center;width: 20%;margin-left: 0px;line-height: 60rpx;height: 60rpx;float: left;">
									<view>已报废</view>
									<view class="content_head_zcnum" @tap="zcnum_click($event)" data-id="ybf">{{sumCount_YBF}}</view>
								</view>
							</view>
			 				 </view>
			 </view>
			 
			 
			 <view style="border:0px #ccc solid;margin: 20rpx 20rpx;height: 520rpx;font-size: 30rpx;background-color: #ffffff;border-radius:10px;">
				 <view style="border-bottom: 1px #ccc solid;height: 80rpx;line-height: 80rpx;margin: 0 15rpx">
					 <view style="width: 60rpx;float: left;height: 80rpx;line-height: 80rpx;">
						 <image src="../../static/images/icon-manages-gl.png" class="item-icon" mode=""></image>
						 
					 </view>
					<view style="line-height: 80rpx;height: 80rpx;width: 85%;float: left;font-size: 32rpx;margin-left: 15rpx;">资产管理</view>
				 </view>
				 <view style="height: 400rpx;">
	<view style="height: 160rpx;width: 177rpx;float: left;margin-top: 15rpx;margin-top: 40rpx;">
						  		<view style="text-align: center;width: 100%;margin-left: 0px;">
						  			<image src="../../static/images/icon-queryasset.png" class="item-icon-manager" mode="" @tap="assetquery($event)"></image>
						  		</view>
						 <view style="line-height: 80rpx;height: 80rpx;width: 85%;float: left;padding-left: 30rpx;margin-top: -20rpx;font-size: 29rpx;">资产查询</view>
						  </view>
						 <view style="height: 160rpx;width: 177rpx;float: left;margin-top: 15rpx;margin-top: 40rpx;">
						  		<view style="text-align: center;width: 100%;margin-left: 0px;">
						  			<image src="../../static/images/icon-myasset-query.png" class="item-icon-manager" mode="" @tap="assetmy($event)"></image>
						  		</view>
						 <view style="line-height: 80rpx;height: 80rpx;width: 85%;float: left;padding-left: 30rpx;margin-top: -20rpx;font-size: 29rpx;">我的资产</view>
						  </view>
						 <view style="height: 160rpx;width: 177rpx;float: left;margin-top: 15rpx;margin-top: 40rpx;">
						  		<view style="text-align: center;width: 100%;margin-left: 0px;">
						  			<image src="../../static/images/icon-sy-sys.png" class="item-icon-manager" mode="" @tap="sysasset($event)"></image>
						  		</view>
						 <view style="line-height: 80rpx;height: 80rpx;width: 85%;float: left;padding-left: 30rpx;margin-top: -20rpx;font-size: 29rpx;">资产扫描</view>
						  </view>
						  <view style="height: 160rpx;width: 177rpx;float: left;margin-top: 15rpx;margin-top: 40rpx;">
						   		<view style="text-align: center;width: 100%;margin-left: 0px;">
						   			<image src="../../static/images/icon-zc-ck.png" class="item-icon-manager" mode="" @tap="sysuploadasset($event)"></image>
						   		</view>
						  <view style="line-height: 80rpx;height: 80rpx;width: 85%;float: left;padding-left: 30rpx;margin-top: -20rpx;font-size: 29rpx;">入库拍照</view>
						   </view>
						<view style="height: 160rpx;width: 177rpx;float: left;margin-top: 15rpx;margin-top: 40rpx;">
												<view style="text-align: center;width: 100%;margin-left: 0px;">
													 <image src="../../static/images/icon--sy-pandian.png" class="item-icon-manager" mode="" @tap="stockhome($event)"></image>
												 </view>
												<view style="line-height: 80rpx;height: 80rpx;width: 85%;float: left;padding-left: 30rpx;margin-top:-20rpx;font-size: 29rpx;">资产盘点</view>
						</view>				 
						
						   
		
					 </view>
				 </view>
			
			</mescroll-body>
		
		</view>
		<aui-dialog
			ref="dialog"
			:title="auiDialog.title"
			:msg="auiDialog.msg"
			:btns="auiDialog.btns"
			:mask="auiDialog.mask"
			:maskTapClose="auiDialog.maskTapClose"
			:items="auiDialog.items"
			:theme="auiDialog.theme"
			@callback="dialogCallback"
		></aui-dialog>
		<tab-bar class="fixs" ref='commentTabbat' :actives='active' :myactives='active'></tab-bar>
		</view>
	</template>

<script>
	import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
	import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
	import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
	import MescrollMoreItemMixin from "@/components/mescroll-uni/mixins/mescroll-more-item.js";
	import auiDialog from '@/components/aui-dialog/aui-dialog.vue';
	import tabBar from '@/components/tabbar/tabbar.vue';
	import mybase64 from "@/pages/API/lib/base64q5h3/jquery.base64.js";
	import parseJson from "@/pages/API/lib/base64q5h3/parseJson.js";
	import bridge from "@/pages/API/lib/bridge/bridge.js";
	import IndexDBCache from "@/pages/API/sqllite/indexDB.js"; // 你的文件的位置
	
	var self;
	export default {
		mixins: [MescrollMixin], // 使用mixin
		components: {
						MescrollBody
						,
						MescrollUni
						,
						auiDialog,
						tabBar
					},
		data() {
			return {
				downOption: {
					auto:true,
					native: false,
					beforeEndDownScroll:1000,
					textInOffset:"下拉刷新",
					textOutOffset:"释放刷新",
					textLoading:"加载中..."
					},
				// 上拉加载的配置(可选, 绝大部分情况无需配置)
				upOption: {
					auto:false, // 不自动加载
					page: {
						size: 6 // 每页数据的数量,默认10
					},
					noMoreSize: 3, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
					empty: {
						tip: '暂无相关数据'
					},
					toTop:{
						src : "../../static/images/icon-up.png" ,
						offset : 50,
						duration : 300,
						zIndex: 9990,
						right: 20,
						bottom: 120,
						safearea: false,
						width: 72,
						radius: "50%",
						left: null
					},
				},
				loginName: "",
				searchtext: "",
				exitNum:0,
				sumCount:0,
				sumCount_KC:0,
				sumCount_ZY:0,
				sumCount_XZ:0,
				sumCount_JY:0,
				sumCount_YBF:0,
				active: Number || 0,
				contentHeight: null,
				auiDialog: {
					title: '',
					msg: '',
					btns: [{name: '确定'}],
					mask: true,
					maskTapClose: true,
					items: [],
					theme: 1,
				},
				
			}
		},
		provide(){
			return {
				_mainFuncInit: this._mainFuncInit
			}
		},
		computed: {
			tabHeightVal(){
				return (uni.getSystemInfoSync().windowHeight)+'px'
			}
			},	
		onBackPress(options) {
			self=this;
				console.log(this.exitNum);
				if(this.exitNum>=1){
					this.confirmMoreBtns(3);	  
					//uni.navigateTo({
					//	url: '../login/login',
					//});
						return true;
				}else{
					this.exitNum=this.exitNum+1;
					uni.showToast({
						icon: 'none',
						title: '再次点击退出应用'
					});
				}
									 	// return true 表示禁止默认返回
									 	return true;
				          // return false;  
		}, 
		onLoad(options){
			self=this;
			//底部导航开始
			let temp = uni.getStorageSync('setStatusIndexFunc') || 0
			uni.setStorageSync('setStatusIndexFunc', temp)
			this.active = temp
			this.$nextTick(()=>{
				this.$refs.commentTabbat.getSetting(temp)
				this._initData();
			})
			/*
			this.request_tool({
				url:'/app/v1/fileOss/getFilePath',
				type:'POST',
				data:{
			 	
			 }
			}).then(res => {
			    console.log(res);
				if(res.data.code==2000){					
					let filepath= res.data.data.split('\"').join('');
					console.log(filepath);
					uni.setStorage({
						key: 'localurlfileurl',
						data: filepath
					});
				}
				
			}).catch(err => {
			  console.error(err);
			});
			 */
			
		   
		  
		  this.loginName=options.LoginName;
		  /*
		 var IdexSumCount=uni.getStorageSync("IdexSumCount");
		 if(IdexSumCount!=undefined && IdexSumCount!=""){
				self.sumCount=IdexSumCount;
				var IdexSumCount_ZY=uni.getStorageSync("IdexSumCount_ZY");
				if(IdexSumCount_ZY!=undefined && IdexSumCount_ZY!=""){
					self.sumCount_ZY=IdexSumCount_ZY;
				}
				var IdexSumCount_KC=uni.getStorageSync("IdexSumCount_KC");
				if(IdexSumCount_KC!=undefined && IdexSumCount_KC!=""){
					self.sumCount_KC=IdexSumCount_KC;
				}
				var IdexSumCount_XZ=uni.getStorageSync("IdexSumCount_XZ");
				if(IdexSumCount_XZ!=undefined && IdexSumCount_XZ!=""){
					self.sumCount_XZ=IdexSumCount_XZ;
				}
				var IdexSumCount_JY=uni.getStorageSync("IdexSumCount_JY");
				if(IdexSumCount_JY!=undefined && IdexSumCount_JY!=""){
					self.sumCount_JY=IdexSumCount_JY;
				}
				var IdexSumCount_YF=uni.getStorageSync("IdexSumCount_YF");
				if(IdexSumCount_YF!=undefined && IdexSumCount_YF!=""){
					self.sumCount_YBF=IdexSumCount_YF;
				}
			}else{
				*/
				this.request_tool({
					url:'/app/v1/asset/assetStateStatistics',
					type:'POST',
					data:{
					"excludeStatus":['delete'],					
					assetStatusIds: ["idle", "inuse", "store", "scrap", "borrow"],
					showXuli:false,
				 }
				}).then(res => {
					console.log(res);
					if (res.data.code == 2000) {
						var allcount=0;
						for(var i=0;i<res.data.data.length;i++){
							var model=res.data.data[i];
							//assetStatusIds: ["idle", "inuse", "store", "scrap", "borrow"],
							if(model.assetStatusId=="inuse"){
								allcount=allcount+model.assetCount;
								self.sumCount_ZY=model.assetCount;
								uni.setStorageSync("IdexSumCount_ZY",model.assetCount)
							}else if(model.assetStatusId=="idle"){
								allcount=allcount+model.assetCount;
								self.sumCount_XZ=model.assetCount;
								uni.setStorageSync("IdexSumCount_XZ",model.assetCount)
							}else if(model.assetStatusId=="store"){
								allcount=allcount+model.assetCount;
								self.sumCount_KC=model.assetCount;
								uni.setStorageSync("IdexSumCount_KC",model.assetCount)
							}else if(model.assetStatusId=="scrap"){
								allcount=allcount+model.assetCount;
								self.sumCount_YBF=model.assetCount;
								uni.setStorageSync("IdexSumCount_YF",model.assetCount)
							}else if(model.assetStatusId=="borrow"){
								allcount=allcount+model.assetCount;
								self.sumCount_JY=model.assetCount;
								uni.setStorageSync("IdexSumCount_JY",model.assetCount)
							}
						}
						self.sumCount=allcount;
						uni.setStorageSync("IdexSumCount",allcount)
					}else{
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				}).catch(err => {
				  console.error(err);
				});
		  	//}
		},
		provide(){
			return {
				_mainFuncInit: this._mainFuncInit
			}
		},
		created() {
		},
		onShow(){
			//this.mescroll.resetUpScroll();
		},
		methods: {
			/**
			 * @name 公共点击函数
			 * */
			_mainFuncInit(){
				this.active = uni.getStorageSync('setStatusIndexFunc') || 0
				//console.log(this.active)
				if(this.active==1){
					uni.navigateTo({
						url: '../asset/myasset',
					});	
					
				}else if(this.active==3){
					uni.navigateTo({
						url: '../home/home',
					});	
					
				}else if(this.active==4){
					uni.navigateTo({
						url: '../home/mysetup',
					});	
					
				}
			},
			/**
			 * @name 首页数据初始化 
			 * */
			_initData(){
				this._mainFuncInit();
			},
			getheight(){
				return uni.getSystemInfoSync().windowHeight;
			},
			stockhome(e) {
				
				 let userInfo = uni.getStorageSync("userInfo");
				 //console.log(userInfo);
				  if (userInfo) {
					  uni.setStorageSync('setStatusIndexFunc', 3);
					  uni.navigateTo({
					  	url: '../home/home?LoginName=' +JSON.parse(userInfo).loginName
					  });
					  }
							
			},
			assetquery(e){
				uni.navigateTo({
					url: '../asset/assetquery',
				});	
				//window.location.href = uni.getStorageSync("urlqian")+'/asset/assetquery';
						
			},
			assetmy(e){
				uni.setStorageSync('setStatusIndexFunc', 1);
				uni.navigateTo({
					url: '../asset/myasset',
				});	
				//window.location.href = uni.getStorageSync("urlqian")+'/asset/myasset';
			},
			datalocal(e){
				uni.navigateTo({
					url: '../home/datalocal',
				});	
				//window.location.href = uni.getStorageSync("urlqian")+'/home/datalocal';
			},
			sysasset(e){
				/*
				uni.showModal({
				    title: '输入资产编码',
				   content: '',
				   						editable: true, //是否显示输入框
				   						placeholderText: '请输入资产编码', //输入框提示内容
				   						confirmText: '确认',
				   						cancelText: '取消',

				    success: function (res) {
				        if (res.confirm) {
				            console.log('用户输入的内容:', res.content);
							uni.navigateTo({
								url: "../asset/asset?Type=2&AssetCode="+res.content
							});
				        } else if (res.cancel) {
				            console.log('用户点击取消');
				        }
				    }
				});
				return;
				*/
				
				uni.setStorageSync('scanmytype', "asset");
				uni.navigateTo({
					url: '../home/scan-stock',
				});	
				return;
				
				
				
				// 只允许通过相机扫码
				// 只允许通过相机扫码
				uni.setStorageSync("syshuitiao",'/asset/asset?Type=2');
				const Bridge = window.Bridge || {}
				const decrypt = window.decrypt || {}
				return new Promise((resolve, reject) => {
					    Bridge.callByJsUrl(
				        //'gtjalink://modulescan?method=scanQRCode&needHandle=1',
						'gtjalink://modulescan?method=scanQRCode&needHandle=1',
				        response => {
							
							
				            if (response.error === '1') {
				                reject(new Error('getUserID error' + JSON.stringify(response)))
				                          } else {
											  alert(response);
				                              console.log('getUserID', response);
				                              resolve(Object.assign({}, response))
				                          }
				                      }
				                        )
					                });
				
			  
			},
			sysuploadasset(e){
				//008804-1000329
				/*
				uni.showModal({
				    title: '输入资产编码',
				   content: '',
				   						editable: true, //是否显示输入框
				   						placeholderText: '请输入资产编码', //输入框提示内容
				   						confirmText: '确认',
				   						cancelText: '取消',
				
				    success: function (res) {
				        if (res.confirm) {
				            console.log('用户输入的内容:', res.content);
							uni.navigateTo({
								url: "../asset/assetedit?Type=2&AssetCode="+res.content
							});
				        } else if (res.cancel) {
				            console.log('用户点击取消');
				        }
				    }
				});
				return;
				*/
				uni.setStorageSync('scanmytype', "assetupload");
				uni.navigateTo({
					url: '../home/scan-stock',
				});	
				return;
				
				uni.setStorageSync("syshuitiao",'/asset/assetedit?Type=2');
				const Bridge = window.Bridge || {}
				const decrypt = window.decrypt || {}
				return new Promise((resolve, reject) => {
					    Bridge.callByJsUrl(
				        'gtjalink://modulescan?method=scanQRCode&needHandle=1',
						//'gtjalink://modulescan?method=scanQRCode',
				        response => {
							
				            if (response.error === '1') {
				                reject(new Error('getUserID error' + JSON.stringify(response)))
				                          } else {
											  alert(response);
				                              console.log('getUserID', response);
				                              resolve(Object.assign({}, response))
				                          }
				                      }
				                        )
					                });
									
								   
			},
			outasset(e){
				// 只允许通过相机扫码
				uni.navigateTo({
					url: '../asset/documentlist',
				});	
				
				return;
				
			},
			signforasset(e) {
				
				uni.navigateTo({
					url: '../signfor/SignForAsset',
					success: function (e) {
										var page = getCurrentPages()[0]
										if (page == undefined || page == null) return;
											 page.navigateHandle(); 
									 }
				});				
			},
			signlist(e){
				
				uni.navigateTo({
					url: '../signfor/Signlist',
				});				
			},
			zcnum_click(e) {
				console.log(e.currentTarget.dataset.id);
				uni.navigateTo({
					url: '../asset/assetlist?searchType=' + e.currentTarget.dataset.id,
				});
				//window.location.href = uni.getStorageSync("urlqian")+'/asset/assetlist?searchType=' + e.currentTarget.dataset.id;
				
				
			},
			
			deleteBuildTable() {
				//SQLite      
				//openComDB('nfc', '_doc/nfcList.db', res => {
				//	console.log('打开数据库');
				//});
			
				uni.setStorage({
					key: 'SaveStockDocumentCode',
					data: ''
				});
								
				//var sqlTable =
				//	'delete FROM MybuildTable'
				//executeSQL('nfc', sqlTable, res => {
				//	console.log(res);
				//})
			
			
			
				
			
				
			},
			confirmMoreBtns(theme){
				var _this = this;
				_this.auiDialog.title = '提示';
				_this.auiDialog.msg = '是否退出登录？';
				_this.auiDialog.items = [];
				_this.auiDialog.btns = [
					{name: '直接退出'},
					{name: '清理缓存退出'}, 
					{name: "取消", color: "#909090"}
				];
				_this.auiDialog.theme = theme;
				_this.$refs.dialog.show();
			},//dialog弹窗底部按钮回调
			dialogCallback(e){
				var _this = this;
				self=this;
				console.log(e);			
				if(_this.$refs.dialog.getVal().length > 0)
				{ //prompt输入框——点击确定时弹出输入内容
					_this.auiDialog.title = '提示';
					_this.$refs.dialog.getVal().forEach(function(item, index){
						_this.auiDialog.msg += '<div style="display: flex;">' + item.label + '：' + item.value + '</div>';
					});
					_this.auiDialog.btns = [{name: '确定', color: '#197DE0'}];
					_this.auiDialog.items = [];
					_this.auiDialog.theme = 1;
					_this.$refs.dialog.show();
				}
				if(e.msg=="直接退出"){
					uni.removeStorage({
						key:"userInfo"
					});
					uni.removeStorage({
						key:"LoginName"
					});
					uni.removeStorage({
						key:"authorization"
					});
					uni.removeStorage({
						key:"userToken"
					});
					uni.removeStorage({
						key:"userRoles"
					});
					uni.removeStorage({
						key:"userDept"
					});
					uni.removeStorage({
						key:"userReadDeptIds"
					});
					uni.removeStorage({
						key:"managePositionIds"
					});
					uni.removeStorage({
						key:"SSO"
					});
					uni.navigateTo({
						url: '../login/login',
					});	
					//window.location.href = uni.getStorageSync("urlqian")+'/login/login';
				}else if(e.msg=="清理缓存退出"){
					uni.showNavigationBarLoading(); //显示加载动画
					uni.removeStorage({
						key:"userInfo"
					});
					uni.removeStorage({
						key:"LoginName"
					});
					uni.removeStorage({
						key:"authorization"
					});
					uni.removeStorage({
						key:"userToken"
					});
					uni.removeStorage({
						key:"userRoles"
					});
					uni.removeStorage({
						key:"userDept"
					});
					uni.removeStorage({
						key:"userReadDeptIds"
					});
					uni.removeStorage({
						key:"managePositionIds"
					});
					uni.removeStorage({
						key:"SSO"
					});
					//IndexDBCache.clearData('databaseName',"MyPositionTable",function(e){});
					
					
					uni.removeStorage({
						key:"盘点数据同步"
					});
					uni.removeStorage({
						key:"资产位置同步"
					});
					uni.removeStorage({
						key:"资产数据同步"
					});
					IndexDBCache.clearData('databaseName',"MyPositionTable",function(e){
						uni.hideNavigationBarLoading();
						uni.navigateTo({
							url: '../login/login',
						});
					});
					
					
					//window.location.href = uni.getStorageSync("urlqian")+'/login/login';
				}
				
			},
			openWin(url, opts){
				aui.openWin(url, opts)
			},
			closeWin(){
				aui.closeWin();
			},
			request_tool(options){
			 // 在这里可以对请求头进行一些设置
			 let baseUrl = uni.getStorageSync("localurl"); 
			 let userInfo = uni.getStorageSync("userInfo");
			 if (userInfo) {
			 	options.data['userLevelCode'] =JSON.parse(userInfo).levelCode;
			 	options.data['loginUserId'] = JSON.parse(userInfo).id;
			 }
			 let userDept = uni.getStorageSync("userDept");
			 //console.log(userDept);
			 if (userDept) {
			 	options.data['loginUserDeptLevelCode'] = userDept.levelCode;
			 	options.data['loginUserDeptId'] = userDept.id;
			 }
			 let currentRole = uni.getStorageSync("userRoles");
			  //console.log(currentRole);
			 if (currentRole) {
			 	options.data['roleLevelCode'] = currentRole[0].levelCode;
			 	options.data['roleId'] = currentRole[0].id;
			 }
			 let userReadDeptIds = uni.getStorageSync("userReadDeptIds");
			 
			 if (userReadDeptIds) {
			 	options.data['deptIds'] =userReadDeptIds;
			 }
			 
			  options.header = {
			      'Content-Type':'application/json',
			      Authorization: uni.getStorageSync("authorization")
			 }
			//console.log(options);
			    return new Promise((resolve, reject) => {
			        uni.request({
			            url: baseUrl + options.url || '',
			            method: options.type || 'POST',
			            data: options.data || {},
			            header: options.header || {}      
			        }).then(data => {
			            let [err, res] = data;
						if(res.data.code==5001 || res.data.code==5002 ||
						res.data.code==5003 || res.data.code==5004){
							uni.removeStorageSync("LoginName");
							uni.removeStorageSync("userInfo");
							uni.removeStorageSync("authorization");
							uni.removeStorageSync("userToken")
							uni.removeStorageSync("userRoles");
							uni.removeStorageSync("userDept");
							uni.removeStorageSync("userReadDeptIds");
							uni.removeStorageSync("managePositionIds");
							uni.removeStorageSync("ASSETCODE");
							uni.navigateTo({
								url: '../login/login',
							});
						}
			            resolve(res);
			        }).catch(error => {
			            reject(error)
			        })
			    });
			}
		}
	}
</script>
<style>
	.content {
		background-color:#edf1f4;
	}
	.content .topcomtent{
		background-color: #6D8AF9;
		height: 300rpx;
		}
	.content_Gaik{
		border:0px #ccc solid;
		margin: 20rpx 20rpx;
		margin-top: 15rpx;
		height: 400rpx;
		font-size: 25rpx;
		background-color: #ffffff;
		border-radius:10px;		
	}
	.content_head{
		border-bottom: 1px #ccc solid;
		height: 80rpx;
		line-height: 80rpx;
		margin: 0 15rpx;
	}
	.content_head_zcnum{
		line-height: 80rpx;
		height: 80rpx;
		text-align:center;
		margin-top:-20rpx;
		color:#6D8AF9;
	}

	.item-icon {
		width: 40rpx;
		height: 40rpx;
		margin-top: 20rpx;
		margin-left: 15rpx;
	}
	.item-icon-manager {
		width: 90rpx;
		height: 90rpx;
		margin-top: 20rpx;
	}
</style>
